package com.changgou.page.listener;

import com.changgou.page.config.RabbitmqConfiguration;
import com.changgou.page.service.PageService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class pageListener {
    @Autowired
    private PageService pageService;

    @RabbitListener(queues = RabbitmqConfiguration.SEARCH_CREATE_QUEUE)
    public void generateHtml(String spuId){
        System.out.println("需要生成静态页面的spuId:"+spuId);
        pageService.generateHtml(spuId);
    }
}
